<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <home></home>
  </div>
  <script src="./vue.js"></script>
  <script>
    const CommonTitle = {
      template: `
        <div>
          <slot name="a"></slot>  
          <h3>这是中间</h3>
          <slot name="b"></slot>  
        </div>
      `,
      
    }
    Vue.component('Home', {
      template: `
        <div>
          <h2>我是home</h2>  
  
          <common-title>
            <div slot="b">
              <button>插槽嵌套内容</button>  
              <i>dhwidwid</i>
            </div>  
            <div slot="a">
              <strong>dwdw3feg4rhty</strong>  
            </div>
          </common-title>
          
        </div>
      `,
      components: {
        CommonTitle
      }
    })
    const vm = new Vue({
      el: '#app'
    })
  </script>
</body>
</html>